package datatypes.r2.basic.impl;

import datatypes.r2.basic.SC;
import datatypes.r2.basic.ST;
import datatypes.r2.flavors.CV;
import datatypes.r2.flavors.impl.CodedValue;

/**
 * A character string that optionally may have a code attached.
 * 
 * The text SHALL always be present if a code is present. The code is often a
 * local code.
 * 
 * @author Obama
 * 
 */
public class CharacterStringWithCode extends CharacterString implements SC {

	private static final long serialVersionUID = 1L;

	private CodedValue code;

	/**
	 * A code representing the string data. For example, the string data may be
	 * a user-message out of a message-catalog where the code represents the
	 * identifier of the message in the message catalog.
	 */
	@Override
	public CV code() {

		return code;
	}

	@Override
	public SC promotion(ST x) {
		// TODO Auto-generated method stub
		return null;
	}

}
